<template>
  <div class="sidebar">
    <!-- 侧边栏 -->
    <van-sidebar :active-key="activeKey" @change="onChange">
      <van-sidebar-item title="住宿情况" />
      <van-sidebar-item title="单人间" />
      <van-sidebar-item title="双人间" />
      <van-sidebar-item title="空调WiFi" />
    </van-sidebar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeKey: 0
    };
  },

  methods: {
    onChange(key) {
      this.activeKey = key;
    }
  }
};
</script>

<style lang="stylus" scoped>
.sidebar {
  position: absolute;
  z-index: 1;
}
</style>
